﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
using System.Data;
using ChuanYe.WorkLogManagement.Model;

namespace ChuanYe.WorkLogManagement.Api.Controllers
{
    public class Pickout
    {
        private static XmlDocument xmlDoc = new XmlDocument();
        private static object objLock = new object();
        public Pickout() { }

        public static RequstPageBase SetPage(dynamic entity)
        {
            RequstPageBase pager = new RequstPageBase();
            if (entity != null)
            {
                pager.PageIndex = entity.PageIndex == 0 ? 1 : entity.PageIndex;
                pager.PageSize = entity.PageSize == 0 ? 20 : entity.PageSize;
                pager.StartTime = entity.StartTime;
                pager.Keyword = entity.Keyword;
                pager.EndTime = entity.EndTime;
            }
            return pager;
        }
    }
}